(function() {"use strict";var __module = CC_EDITOR ? module : {exports:{}};var __filename = 'preview-scripts/assets/script/JumpPlatForm.js';var __require = CC_EDITOR ? function (request) {return cc.require(request, require);} : function (request) {return cc.require(request, __filename);};function __define (exports, require, module) {"use strict";
cc._RF.push(module, '712a8BAxXVIm4ebUqH3DVD/', 'JumpPlatForm', __filename);
// script/JumpPlatForm.js

"use strict";

/**
 * 弹簧道具
 */
cc.Class({
    extends: cc.Component,

    properties: {},

    onLoad: function onLoad() {},

    // 只在两个碰撞体开始接触时被调用一次
    onBeginContact: function onBeginContact(contact, selfCollider, otherCollider) {
        this.player = otherCollider.node.getComponent("Player");
        this.animation = otherCollider.node.getComponent(cc.Animation);
        //播放动画和给一个向上的线速度
        selfCollider.node.getComponent(cc.Animation).play("jumpPlatForm");
        if (selfCollider.tag === cc.vv.TAG.SPRINGUP) {
            this.player.initPrivateData();
            this.player.initListener();
            cc.vv.isHeroDie = false;
            otherCollider.node.prop = 'Jump';
            this.animation.stop();
            this.animation.play("heroJump");
            //火箭监听
            var rocket = otherCollider.node.parent.getChildByName("prop").getChildByName("rocket_prop");
            rocket.getComponent(cc.RigidBody).enabledContactListener = true;
            this.player.copyCrash();
            otherCollider.node.getComponent(cc.RigidBody)._b2Body.m_linearVelocity.y = 23;
        }
    }

    // start () {},

    // update (dt) {},
});

cc._RF.pop();
        }
        if (CC_EDITOR) {
            __define(__module.exports, __require, __module);
        }
        else {
            cc.registerModuleFunc(__filename, function () {
                __define(__module.exports, __require, __module);
            });
        }
        })();
        //# sourceMappingURL=JumpPlatForm.js.map
        